<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>个人主页</title>
</head>
<body>
<script language="JavaScript" src="js/jquery-3.4.1.js"></script>
邮箱地址：<span id="email"></span>

<script>
    $(document).ready(function(){
        $.getUrlParam = function (name) {
            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
            var r = window.location.search.substr(1).match(reg);
            if (r != null) return unescape(r[2]); return null;
        }
        var token = $.getUrlParam('token');
        console.log("token="+token)
        if(token==null || token=="") {
            location.href = "login.html"
            return false
        }else {
            var res = $.ajax({url: "http://www.txy.com:9003/api/user/info/" + token+"?token="+token, async: false});
            if (res.responseText == "" || res.responseText=="denied") {
                location.href = "login.html"
                return false
            } else {
                $("#email").html(res.responseText)
            }
        }

    });
</script>
</body>
</html>